home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
201-225
/
disk_222
/
plplot
/
src
/
source.zoo
/
plabv.c
< prev
next >
Wrap
C/C++ Source or Header
|
1989-05-15
|
493b
|
22 lines
#include "plplot.h"
/* Determines if point (px,py) lies above the line joining (sx1,sy1) to */
/* (sx2,sy2). It only works correctly if sx1 <= px <= sx2 */
int plabv(px, py, sx1, sy1, sx2, sy2)
int px, py, sx1, sy1, sx2, sy2;
{
int above;
if (py >= sy1 && py >= sy2)
above = 1;
else if (py < sy1 && py < sy2)
above = 0;
else if ((sx2-sx1) * (py-sy1) > (px-sx1) * (sy2-sy1))
above = 1;
else
above = 0;
return(above);
}